package cn.muyang.utils;

import cn.muyang.Util;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

public class Snippets {

    private final static Properties snippets = new Properties();

    public Snippets() {
        init();
    }

    private void init() {
        try {
            StringBuilder sb = new StringBuilder();
            sb.append("LOCAL_LOAD_ARG_1=clocal$index.i = (jint) $arg;\n");
            sb.append("LOCAL_LOAD_ARG_2=clocal$index.i = (jint) $arg;\n");
            sb.append("LOCAL_LOAD_ARG_3=clocal$index.i = (jint) $arg;\n");
            sb.append("LOCAL_LOAD_ARG_4=clocal$index.i = (jint) $arg;\n");
            sb.append("LOCAL_LOAD_ARG_5=clocal$index.i = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_6=clocal$index.f = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_7=clocal$index.j = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_8=clocal$index.d = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_9=clocal$index.l = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_10=clocal$index.l = $arg;\n");
            sb.append("LOCAL_LOAD_ARG_11=clocal$index.l = $arg;\n");
            sb.append("NOP=;\n");
            //sb.append("#ACONST_NULL=cstack$stackindex0.l = nullptr;\n");
            sb.append("ACONST_NULL=cstack$stackindex0.l = NULL;\n");
            sb.append("ICONST_M1=cstack$stackindex0.i = -1;\n");
            sb.append("ICONST_0=cstack$stackindex0.i = 0;\n");
            sb.append("ICONST_1=cstack$stackindex0.i = 1;\n");
            sb.append("ICONST_2=cstack$stackindex0.i = 2;\n");
            sb.append("ICONST_3=cstack$stackindex0.i = 3;\n");
            sb.append("ICONST_4=cstack$stackindex0.i = 4;\n");
            sb.append("ICONST_5=cstack$stackindex0.i = 5;\n");
            sb.append("LCONST_0=cstack$stackindex0.j = 0;\n");
            sb.append("LCONST_1=cstack$stackindex0.j = 1;\n");
            sb.append("FCONST_0=cstack$stackindex0.f = 0.0f;\n");
            sb.append("FCONST_1=cstack$stackindex0.f = 1.0f;\n");
            sb.append("FCONST_2=cstack$stackindex0.f = 2.0f;\n");
            sb.append("DCONST_0=cstack$stackindex0.d = 0.0;\n");
            sb.append("DCONST_1=cstack$stackindex0.d = 1.0;\n");
            sb.append("BIPUSH=cstack$stackindex0.i = (jint) $operand;\n");
            sb.append("SIPUSH=cstack$stackindex0.i = (jint) $operand;\n");
            //sb.append("#LDC_STRING=cstack$stackindex0.l = $cst_ptr;\n");
            sb.append("LDC_STRING=cstack$stackindex0.l = (*env)->NewString(env, $cst_ptr, $cst_length);\n");
            sb.append("LDC_STRING_NULL=cstack$stackindex0.l = (*env)->NewString(env, NULL, 0);\n");
            sb.append("LDC_INT=cstack$stackindex0.i = $cst;\n");
            sb.append("LDC_FLOAT=cstack$stackindex0.f = $cst;\n");
            sb.append("LDC_LONG=cstack$stackindex0.j = $cst;\n");
            sb.append("LDC_DOUBLE=cstack$stackindex0.d = $cst;\n");
            sb.append("LDC_CLASS=cstack$stackindex0.l = $class_ptr(env)->clazz;\n");
            sb.append("ILOAD=cstack$stackindex0.i = clocal$var.i;\n");
            sb.append("LLOAD=cstack$stackindex0.j = clocal$var.j;\n");
            sb.append("FLOAD=cstack$stackindex0.f = clocal$var.f;\n");
            sb.append("DLOAD=cstack$stackindex0.d = clocal$var.d;\n");
            sb.append("ALOAD=cstack$stackindex0.l = clocal$var.l;\n");
            //sb.append("#IALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->GetIntArrayRegion((jintArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.i); } $trycatchhandler\n");
            sb.append("IALOAD=  (*env)->GetIntArrayRegion(env, (jintArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.i); $trycatchhandler\n");
            sb.append("IALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("IALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("IALOAD_S_CONST_ERROR_DESC=IALOAD npe\n");
            //sb.append("#LALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->GetLongArrayRegion((jlongArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.j); } $trycatchhandler\n");
            sb.append("LALOAD=(*env)->GetLongArrayRegion(env, (jlongArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.j); $trycatchhandler\n");
            sb.append("LALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("LALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("LALOAD_S_CONST_ERROR_DESC=LALOAD npe\n");
            //sb.append("#FALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->GetFloatArrayRegion((jfloatArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.f); } $trycatchhandler\n");
            sb.append("FALOAD=(*env)->GetFloatArrayRegion(env, (jfloatArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.f); $trycatchhandler\n");
            sb.append("FALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("FALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("FALOAD_S_CONST_ERROR_DESC=FALOAD npe\n");
            //sb.append("#DALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->GetDoubleArrayRegion((jdoubleArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.d); } $trycatchhandler\n");
            sb.append("DALOAD=(*env)->GetDoubleArrayRegion(env, (jdoubleArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.d); $trycatchhandler\n");
            sb.append("DALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("DALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("DALOAD_S_CONST_ERROR_DESC=DALOAD npe\n");
            //sb.append("#AALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm2.l = env->GetObjectArrayElement((jobjectArray) cstack$stackindexm2.l, cstack$stackindexm1.i); refs.insert(cstack$stackindexm2.l); } $trycatchhandler\n");
            sb.append("AALOAD=cstack$stackindexm2.l = (*env)->GetObjectArrayElement(env, cstack$stackindexm2.l, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("AALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("AALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("AALOAD_S_CONST_ERROR_DESC=AALOAD npe\n");
            //sb.append("#BALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm2.i = (jint) utils::baload(env, (jarray) cstack$stackindexm2.l, cstack$stackindexm1.i); } $trycatchhandler\n");
            //sb.append("#BALOAD= cstack$stackindexm2.i = (jint) utils::baload(env, (jarray) cstack$stackindexm2.l, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("BALOAD= (*env)->GetByteArrayRegion(env, cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &cstack$stackindexm2.b); \\n    cstack$stackindexm2.i = cstack$stackindexm2.b; $trycatchhandler\n");
            sb.append("BALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("BALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("BALOAD_S_CONST_ERROR_DESC=BALOAD npe\n");
            //sb.append("#CALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { jchar temp = 0; env->GetCharArrayRegion((jcharArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &temp); cstack$stackindexm2.i = (jint) temp; } $trycatchhandler\n");
            sb.append("CALOAD={ \\njchar temp = 0; \\n(*env)->GetCharArrayRegion(env, (jcharArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &temp); \\n    cstack$stackindexm2.i = (jint) temp; \\n} $trycatchhandler\n");
            sb.append("CALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("CALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("CALOAD_S_CONST_ERROR_DESC=CALOAD npe\n");
            //sb.append("#SALOAD=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { jshort temp = 0; env->GetShortArrayRegion((jshortArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &temp); cstack$stackindexm2.i = (jint) temp; } $trycatchhandler\n");
            sb.append("SALOAD={ \\njshort temp = 0; \\n(*env)->GetShortArrayRegion(env, (jshortArray) cstack$stackindexm2.l, cstack$stackindexm1.i, 1, &temp); \\n    cstack$stackindexm2.i = (jint) temp; \\n} $trycatchhandler\n");
            sb.append("SALOAD_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("SALOAD_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("SALOAD_S_CONST_ERROR_DESC=SALOAD npe\n");
            sb.append("ISTORE=clocal$var.i = cstack$stackindexm1.i;\n");
            sb.append("LSTORE=clocal$var.j = cstack$stackindexm2.j;\n");
            sb.append("FSTORE=clocal$var.f = cstack$stackindexm1.f;\n");
            sb.append("DSTORE=clocal$var.d = cstack$stackindexm2.d;\n");
            sb.append("ASTORE=clocal$var.l = cstack$stackindexm1.l;\n");
            //sb.append("#IASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->SetIntArrayRegion((jintArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &cstack$stackindexm1.i); } $trycatchhandler\n");
            sb.append("IASTORE=(*env)->SetIntArrayRegion(env, (jintArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("IASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("IASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("IASTORE_S_CONST_ERROR_DESC=IASTORE npe\n");
            //sb.append("#LASTORE=if (cstack$stackindexm4.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->SetLongArrayRegion((jlongArray) cstack$stackindexm4.l, cstack$stackindexm3.i, 1, &cstack$stackindexm2.j); } $trycatchhandler\n");
            sb.append("LASTORE=(*env)->SetLongArrayRegion(env, (jlongArray) cstack$stackindexm4.l, cstack$stackindexm3.i, 1, &cstack$stackindexm2.j); $trycatchhandler\n");
            sb.append("LASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("LASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("LASTORE_S_CONST_ERROR_DESC=LASTORE npe\n");
            //sb.append("#FASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->SetFloatArrayRegion((jfloatArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &cstack$stackindexm1.f); } $trycatchhandler\n");
            sb.append("FASTORE=(*env)->SetFloatArrayRegion(env,(jfloatArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &cstack$stackindexm1.f); $trycatchhandler\n");
            sb.append("FASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("FASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("FASTORE_S_CONST_ERROR_DESC=FASTORE npe\n");
            //sb.append("#DASTORE=if (cstack$stackindexm4.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->SetDoubleArrayRegion((jdoubleArray) cstack$stackindexm4.l, cstack$stackindexm3.i, 1, &cstack$stackindexm2.d); } $trycatchhandler\n");
            sb.append("DASTORE=(*env)->SetDoubleArrayRegion(env, (jdoubleArray) cstack$stackindexm4.l, cstack$stackindexm3.i, 1, &cstack$stackindexm2.d); $trycatchhandler\n");
            sb.append("DASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("DASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("DASTORE_S_CONST_ERROR_DESC=DASTORE npe\n");
            //sb.append("#AASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { env->SetObjectArrayElement((jobjectArray) cstack$stackindexm3.l, cstack$stackindexm2.i, cstack$stackindexm1.l); } $trycatchhandler\n");
            //sb.append("#AASTORE=(*env)->SetObjectArrayElement(env, cstack$stackindexm3.l, cstack$stackindexm2.i, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("AASTORE=(*env)->SetObjectArrayElement(env, cstack$stackindexm3.l, cstack$stackindexm2.i, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("AASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("AASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("AASTORE_S_CONST_ERROR_DESC=AASTORE npe\n");
            //sb.append("#BASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { utils::bastore(env, (jarray) cstack$stackindexm3.l, cstack$stackindexm2.i, cstack$stackindexm1.i); } $trycatchhandler\n");
            //sb.append("#BASTORE=utils::bastore(env, (jarray) cstack$stackindexm3.l, cstack$stackindexm2.i, cstack$stackindexm1.i);  $trycatchhandler\n");
            sb.append("BASTORE=temp0.b = (jbyte) cstack$stackindexm1.i; \\n(*env)->SetByteArrayRegion(env, cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &temp0.b); $trycatchhandler\n");
            sb.append("BASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("BASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("BASTORE_S_CONST_ERROR_DESC=BASTORE npe\n");
            //sb.append("#CASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { jchar temp = (jchar) cstack$stackindexm1.i; env->SetCharArrayRegion((jcharArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &temp); } $trycatchhandler\n");
            sb.append("CASTORE={ \\njchar temp = (jchar) cstack$stackindexm1.i; \\n(*env)->SetCharArrayRegion(env, (jcharArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &temp); \\n} $trycatchhandler\n");
            sb.append("CASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("CASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("CASTORE_S_CONST_ERROR_DESC=CASTORE npe\n");
            //sb.append("#SASTORE=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { jshort temp = (jshort) cstack$stackindexm1.i; env->SetShortArrayRegion((jshortArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &temp); } $trycatchhandler\n");
            sb.append("SASTORE={ \\njshort temp = (jshort) cstack$stackindexm1.i; \\n(*env)->SetShortArrayRegion(env, (jshortArray) cstack$stackindexm3.l, cstack$stackindexm2.i, 1, &temp);\\n} $trycatchhandler\n");
            sb.append("SASTORE_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("SASTORE_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("SASTORE_S_CONST_ERROR_DESC=SASTORE npe\n");
            sb.append("POP=;\n");
            sb.append("POP2=;\n");
            sb.append("DUP=cstack$stackindex0 = cstack$stackindexm1;\n");
            sb.append("DUP_X1=cstack$stackindex0 = cstack$stackindexm1; cstack$stackindexm1 = cstack$stackindexm2; cstack$stackindexm2 = cstack$stackindex0;\n");
            sb.append("DUP_X2=cstack$stackindex0 = cstack$stackindexm1; cstack$stackindexm1 = cstack$stackindexm2; cstack$stackindexm2 = cstack$stackindexm3; cstack$stackindexm3 = cstack$stackindex0;\n");
            sb.append("DUP2=cstack$stackindex0 = cstack$stackindexm2; cstack$stackindex1 = cstack$stackindexm1;\n");
            sb.append("DUP2_X1=cstack$stackindex0 = cstack$stackindexm2; cstack$stackindex1 = cstack$stackindexm1; cstack$stackindexm1 = cstack$stackindexm3; cstack$stackindexm2 = cstack$stackindex1; cstack$stackindexm3 = cstack$stackindex0;\n");
            sb.append("DUP2_X2=cstack$stackindex0 = cstack$stackindexm2; cstack$stackindex1 = cstack$stackindexm1; cstack$stackindexm1 = cstack$stackindexm3; cstack$stackindexm2 = cstack$stackindexm4; cstack$stackindexm3 = cstack$stackindex1; cstack$stackindexm4 = cstack$stackindex0;\n");
            //sb.append("#SWAP=swap(cstack$stackindexm1, cstack$stackindexm2);\n");
            sb.append("SWAP={\\njvalue tmp = cstack$stackindexm1;\\ncstack$stackindexm1 = cstack$stackindexm2;\\ncstack$stackindexm2 = tmp;\\n}\\n\n");
            sb.append("IADD=cstack$stackindexm2.i = cstack$stackindexm2.i + cstack$stackindexm1.i;\n");
            sb.append("LADD=cstack$stackindexm4.j = cstack$stackindexm4.j + cstack$stackindexm2.j;\n");
            sb.append("FADD=cstack$stackindexm2.f = cstack$stackindexm2.f + cstack$stackindexm1.f;\n");
            sb.append("DADD=cstack$stackindexm4.d = cstack$stackindexm4.d + cstack$stackindexm2.d;\n");
            sb.append("ISUB=cstack$stackindexm2.i = cstack$stackindexm2.i - cstack$stackindexm1.i;\n");
            sb.append("LSUB=cstack$stackindexm4.j = cstack$stackindexm4.j - cstack$stackindexm2.j;\n");
            sb.append("FSUB=cstack$stackindexm2.f = cstack$stackindexm2.f - cstack$stackindexm1.f;\n");
            sb.append("DSUB=cstack$stackindexm4.d = cstack$stackindexm4.d - cstack$stackindexm2.d;\n");
            sb.append("IMUL=cstack$stackindexm2.i = cstack$stackindexm2.i * cstack$stackindexm1.i;\n");
            sb.append("LMUL=cstack$stackindexm4.j = cstack$stackindexm4.j * cstack$stackindexm2.j;\n");
            sb.append("FMUL=cstack$stackindexm2.f = cstack$stackindexm2.f * cstack$stackindexm1.f;\n");
            sb.append("DMUL=cstack$stackindexm4.d = cstack$stackindexm4.d * cstack$stackindexm2.d;\n");
            //sb.append("#IDIV=if (cstack$stackindexm1.i == -1 && cstack$stackindexm2.i == ((jint) 2147483648U)) { } \\nelse { if (cstack$stackindexm1.i == 0) {throw_exception(env, \"#AE\", \"#ERROR_DESC\", $line); $trycatchhandler } \\nelse { cstack$stackindexm2.i = cstack$stackindexm2.i / cstack$stackindexm1.i; } }\n");
            sb.append("IDIV=cstack$stackindexm2.i = cstack$stackindexm2.i / cstack$stackindexm1.i; \n");
            sb.append("IDIV_S_VARS=#AE,#ERROR_DESC\n");
            sb.append("IDIV_S_CONST_AE=java/lang/ArithmeticException\n");
            sb.append("IDIV_S_CONST_ERROR_DESC=IDIV / cn 0\n");
            sb.append("IDIV_STATIC=if (cstack$stackindexm1.i == 0) { (*env)->ThrowNew(env, $class_ptr(env)->clazz,  \"#ERROR_DESC\"); $trycatchhandler } \\nelse { cstack$stackindexm2.i = cstack$stackindexm2.i / cstack$stackindexm1.i; }\n");
            sb.append("IDIV_STATIC_S_VARS=#ERROR_DESC\n");
            sb.append("IDIV_STATIC_S_CONST_ERROR_DESC=/ cn 0\n");
            //sb.append("#LDIV=if (cstack$stackindexm2.j == -1 && cstack$stackindexm4.j == ((jlong) 9223372036854775808ULL)) { } \\nelse if (cstack$stackindexm2.j == 0) { throw_exception(env, \"#AE\", \"#ERROR_DESC\", $line); $trycatchhandler } \\nelse { cstack$stackindexm4.j = cstack$stackindexm4.j / cstack$stackindexm2.j; }\n");
            //sb.append("#LDIV=if (cstack$stackindexm2.j == 0) { throw_exception(env, \"#AE\", \"#ERROR_DESC\", $line); $trycatchhandler } \\nelse { cstack$stackindexm4.j = cstack$stackindexm4.j / cstack$stackindexm2.j; }\n");
            sb.append("LDIV=cstack$stackindexm4.j = cstack$stackindexm4.j / cstack$stackindexm2.j; \n");
            sb.append("LDIV_S_VARS=#AE,#ERROR_DESC\n");
            sb.append("LDIV_S_CONST_AE=java/lang/ArithmeticException\n");
            sb.append("LDIV_S_CONST_ERROR_DESC=LDIV / cn 0\n");
            sb.append("FDIV=cstack$stackindexm2.f = cstack$stackindexm2.f / cstack$stackindexm1.f;\n");
            sb.append("DDIV=cstack$stackindexm4.d = cstack$stackindexm4.d / cstack$stackindexm2.d;\n");
            //sb.append("#IREM=if (cstack$stackindexm1.i == 0) { throw_exception(env, \"#AE\", \"#ERROR_DESC\", $line); $trycatchhandler \\n} \\nelse { cstack$stackindexm2.i = cstack$stackindexm2.i % cstack$stackindexm1.i; }\n");
            sb.append("IREM=cstack$stackindexm2.i = cstack$stackindexm2.i % cstack$stackindexm1.i;\n");
            sb.append("IREM_S_VARS=#AE,#ERROR_DESC\n");
            sb.append("IREM_S_CONST_AE=java/lang/ArithmeticException\n");
            sb.append("IREM_S_CONST_ERROR_DESC=IREM % cn 0\n");
            //sb.append("#LREM=if (cstack$stackindexm2.j == 0) { throw_exception(env, \"#AE\", \"#ERROR_DESC\", $line); $trycatchhandler \\n} \\nelse { cstack$stackindexm4.j = cstack$stackindexm4.j % cstack$stackindexm2.j; }\n");
            sb.append("LREM=cstack$stackindexm4.j = cstack$stackindexm4.j % cstack$stackindexm2.j;\n");
            sb.append("LREM_S_VARS=#AE,#ERROR_DESC\n");
            sb.append("LREM_S_CONST_AE=java/lang/ArithmeticException\n");
            sb.append("LREM_S_CONST_ERROR_DESC=LREM % cn 0\n");
            sb.append("FREM=cstack$stackindexm2.f = fmod(cstack$stackindexm2.f, cstack$stackindexm1.f);\n");
            sb.append("DREM=cstack$stackindexm4.d = fmod(cstack$stackindexm4.d, cstack$stackindexm2.d);\n");
            sb.append("INEG=cstack$stackindexm1.i = -cstack$stackindexm1.i;\n");
            sb.append("LNEG=cstack$stackindexm2.j = -cstack$stackindexm2.j;\n");
            sb.append("FNEG=cstack$stackindexm1.f = -cstack$stackindexm1.f;\n");
            sb.append("DNEG=cstack$stackindexm2.d = -cstack$stackindexm2.d;\n");
            sb.append("ISHL=cstack$stackindexm2.i = cstack$stackindexm2.i << (0x1f & cstack$stackindexm1.i);\n");
            sb.append("LSHL=cstack$stackindexm3.j = cstack$stackindexm3.j << (0x3f & cstack$stackindexm1.i);\n");
            sb.append("ISHR=cstack$stackindexm2.i = cstack$stackindexm2.i >> (0x1f & cstack$stackindexm1.i);\n");
            sb.append("LSHR=cstack$stackindexm3.j = cstack$stackindexm3.j >> (0x3f & cstack$stackindexm1.i);\n");
            sb.append("IUSHR=cstack$stackindexm2.i = (jint) (((uint32_t) cstack$stackindexm2.i) >> (((uint32_t) cstack$stackindexm1.i) & 0x1f));\n");
            sb.append("LUSHR=cstack$stackindexm3.j = (jlong) (((uint64_t) cstack$stackindexm3.j) >> (((uint64_t) cstack$stackindexm1.i) & 0x3f));\n");
            sb.append("IAND=cstack$stackindexm2.i = cstack$stackindexm2.i & cstack$stackindexm1.i;\n");
            sb.append("LAND=cstack$stackindexm4.j = cstack$stackindexm4.j & cstack$stackindexm2.j;\n");
            sb.append("IOR=cstack$stackindexm2.i = cstack$stackindexm2.i | cstack$stackindexm1.i;\n");
            sb.append("LOR=cstack$stackindexm4.j = cstack$stackindexm4.j | cstack$stackindexm2.j;\n");
            sb.append("IXOR=cstack$stackindexm2.i = cstack$stackindexm2.i ^ cstack$stackindexm1.i;\n");
            sb.append("LXOR=cstack$stackindexm4.j = cstack$stackindexm4.j ^ cstack$stackindexm2.j;\n");
            sb.append("IINC=clocal$var.i += $incr;\n");
            sb.append("I2L=cstack$stackindexm1.j = cstack$stackindexm1.i;\n");
            sb.append("I2F=cstack$stackindexm1.f = (jfloat) cstack$stackindexm1.i;\n");
            sb.append("I2D=cstack$stackindexm1.d = (jdouble) cstack$stackindexm1.i;\n");
            sb.append("L2I=cstack$stackindexm2.i = (jint) cstack$stackindexm2.j;\n");
            sb.append("L2F=cstack$stackindexm2.f = (jfloat) cstack$stackindexm2.j;\n");
            sb.append("L2D=cstack$stackindexm2.d = (jdouble) cstack$stackindexm2.j;\n");
            sb.append("F2I=cstack$stackindexm1.i = (jint) cstack$stackindexm1.f;\n");
            sb.append("F2L=cstack$stackindexm1.j = (jlong) cstack$stackindexm1.f;\n");
            sb.append("F2D=cstack$stackindexm1.d = (jdouble) cstack$stackindexm1.f;\n");
            sb.append("D2I=cstack$stackindexm2.i = (jint) cstack$stackindexm2.d;\n");
            sb.append("D2L=cstack$stackindexm2.j = (jlong) cstack$stackindexm2.d;\n");
            sb.append("D2F=cstack$stackindexm2.f = (jfloat) cstack$stackindexm2.d;\n");
            sb.append("I2B=cstack$stackindexm1.i = (jint) (jbyte) cstack$stackindexm1.i;\n");
            sb.append("I2C=cstack$stackindexm1.i = (jint) (jchar) cstack$stackindexm1.i;\n");
            sb.append("I2S=cstack$stackindexm1.i = (jint) (jshort) cstack$stackindexm1.i;\n");
            sb.append("LCMP=cstack$stackindexm4.i = (cstack$stackindexm4.j == cstack$stackindexm2.j) ? 0 : (cstack$stackindexm4.j > cstack$stackindexm2.j ? 1 : -1);\n");
            sb.append("FCMPL={ \\njfloat value1 = cstack$stackindexm2.f; \\njfloat value2 = cstack$stackindexm1.f; \\ncstack$stackindexm2.i = value1 > value2 ? 1 : ((value1 == value2) ? 0 : ((value1 < value2) ? -1 : -1)); \\n}\n");
            sb.append("FCMPG={ \\njfloat value1 = cstack$stackindexm2.f; \\njfloat value2 = cstack$stackindexm1.f; \\ncstack$stackindexm2.i = value1 > value2 ? 1 : ((value1 == value2) ? 0 : ((value1 < value2) ? -1 : 1)); \\n}\n");
            sb.append("DCMPL={ \\njdouble value1 = cstack$stackindexm4.d; \\njdouble value2 = cstack$stackindexm2.d; \\ncstack$stackindexm4.i = value1 > value2 ? 1 : ((value1 == value2) ? 0 : ((value1 < value2) ? -1 : -1)); \\n}\n");
            sb.append("DCMPG={ \\njdouble value1 = cstack$stackindexm4.d; \\njdouble value2 = cstack$stackindexm2.d; \\ncstack$stackindexm4.i = value1 > value2 ? 1 : ((value1 == value2) ? 0 : ((value1 < value2) ? -1 : 1)); \\n}\n");
            sb.append("IFEQ=if (cstack$stackindexm1.i == 0) goto $label;\n");
            sb.append("IFNE=if (cstack$stackindexm1.i != 0) goto $label;\n");
            sb.append("IFLT=if (cstack$stackindexm1.i < 0) goto $label;\n");
            sb.append("IFLE=if (cstack$stackindexm1.i <= 0) goto $label;\n");
            sb.append("IFGT=if (cstack$stackindexm1.i > 0) goto $label;\n");
            sb.append("IFGE=if (cstack$stackindexm1.i >= 0) goto $label;\n");
            sb.append("IF_ICMPEQ=if (cstack$stackindexm2.i == cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ICMPNE=if (cstack$stackindexm2.i != cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ICMPLT=if (cstack$stackindexm2.i < cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ICMPLE=if (cstack$stackindexm2.i <= cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ICMPGT=if (cstack$stackindexm2.i > cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ICMPGE=if (cstack$stackindexm2.i >= cstack$stackindexm1.i) goto $label;\n");
            sb.append("IF_ACMPEQ=if ((*env)->IsSameObject(env, cstack$stackindexm2.l, cstack$stackindexm1.l)) goto $label;\n");
            sb.append("IF_ACMPNE=if (!(*env)->IsSameObject(env, cstack$stackindexm2.l, cstack$stackindexm1.l)) goto $label;\n");
            sb.append("GOTO=goto $label;\n");
            sb.append("IRETURN=return ($rettype) cstack$stackindexm1.i;\n");
            sb.append("LRETURN=return ($rettype) cstack$stackindexm2.j;\n");
            sb.append("FRETURN=return ($rettype) cstack$stackindexm1.f;\n");
            sb.append("DRETURN=return ($rettype) cstack$stackindexm2.d;\n");
            sb.append("ARETURN=return ($rettype) cstack$stackindexm1.l;\n");
            sb.append("RETURN=return;\n");
            //sb.append("#NEW=if (jobject obj = env->AllocObject($desc_ptr)) { cstack$stackindex0.l = obj; refs.insert(obj); } $trycatchhandler\n");
            //sb.append("NEW=if(!$class_ptr(env)->clazz){printf(\"\\\\n\\\\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\\\\n\\\\n Caused by: java.lang.ClassNotFoundException\\\\n\");$trycatchhandler}else{cstack$stackindex0.l = (*env)->AllocObject(env, $class_ptr(env)->clazz);} $trycatchhandler\n");
            //sb.append("NEW_CATCH=if(!$class_ptr(env)->clazz){cstack$stackindex0.l=NULL; (*env)->ThrowNew(env, (*env)->FindClass(env,\"java/lang/RuntimeException\"), \"\");}else{cstack$stackindex0.l = (*env)->AllocObject(env, $class_ptr(env)->clazz);} $trycatchhandler\n");
            sb.append("NEW=if(!$class_ptr(env)->clazz){$retvalue}cstack$stackindex0.l = (*env)->AllocObject(env, $class_ptr(env)->clazz);if(!cstack$stackindex0.l){$retvalue} $trycatchhandler\n");
            sb.append("NEW_CATCH=if(!$class_ptr(env)->clazz){$retvalue}cstack$stackindex0.l = (*env)->AllocObject(env, $class_ptr(env)->clazz);if(!cstack$stackindex0.l){$retvalue} $trycatchhandler\n");
            //sb.append("#NEW_CATCH=temp0.l = (*env)->FindClass(env, \"$desc_ptr\");$trycatchhandler cstack$stackindex0.l = (*env)->AllocObject(env, (*env)->NewGlobalRef(env, temp0.l)); $trycatchhandler\n");
            //sb.append("#ANEWARRAY=if (cstack$stackindexm1.i < 0) throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewObjectArray(cstack$stackindexm1.i, $desc_ptr, nullptr); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("ANEWARRAY=if (cstack$stackindexm1.i < 0) throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = (*env)->NewObjectArray(env, cstack$stackindexm1.i, $class_ptr(env)->clazz, NULL);}$trycatchhandler\n");
            sb.append("ANEWARRAY_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("ANEWARRAY_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("ANEWARRAY_S_CONST_ERROR_DESC=ANEWARRAY array size < 0\n");
            //sb.append("#ARRAYLENGTH=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = env->GetArrayLength((jarray) cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("ARRAYLENGTH=cstack$stackindexm1.i = (*env)->GetArrayLength(env, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("ARRAYLENGTH_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("ARRAYLENGTH_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("ARRAYLENGTH_S_CONST_ERROR_DESC=ARRAYLENGTH npe\n");
            //sb.append("#ATHROW=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { jthrowable exception = (jthrowable) cstack$stackindexm1.l; env->Throw(exception); refs.insert(exception); } $trycatchhandler\n");
            //sb.append("#ATHROW=if (cstack$stackindexm1.l == NULL) throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\n    else { jthrowable exception = (jthrowable) cstack$stackindexm1.l; (*env)->Throw(env, exception); } $trycatchhandler\n");
            sb.append("ATHROW=if (cstack$stackindexm1.l == NULL) (*env)->ThrowNew(env, $class_ptr(env)->clazz, \"\");else (*env)->Throw(env, cstack$stackindexm1.l);$trycatchhandler\n");
            sb.append("ATHROW_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("ATHROW_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("ATHROW_S_CONST_ERROR_DESC=ATHROW npe\n");
            //sb.append("#INSTANCEOF=cstack$stackindexm1.i = cstack$stackindexm1.l == nullptr ? false : env->IsInstanceOf(cstack$stackindexm1.l, $desc_ptr);\n");
            sb.append("INSTANCEOF=cstack$stackindexm1.i = cstack$stackindexm1.l != NULL && (*env)->IsInstanceOf(env, cstack$stackindexm1.l, $class_ptr(env)->clazz);\n");
            //sb.append("#MONITORENTER=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->MonitorEnter(cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("MONITORENTER=(*env)->MonitorEnter(env, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("MONITORENTER_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("MONITORENTER_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("MONITORENTER_S_CONST_ERROR_DESC=MONITORENTER npe\n");
            //sb.append("#MONITOREXIT=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->MonitorExit(cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("MONITOREXIT=(*env)->MonitorExit(env, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("MONITOREXIT_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("MONITOREXIT_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("MONITOREXIT_S_CONST_ERROR_DESC=MONITORENTER npe\n");
            //sb.append("#IFNULL=if (env->IsSameObject(cstack$stackindexm1.l, nullptr)) goto $label;\n");
            sb.append("IFNULL=if (cstack$stackindexm1.l == NULL) goto $label;\n");
            //sb.append("#IFNONNULL=if (!env->IsSameObject(cstack$stackindexm1.l, nullptr)) goto $label;\n");
            sb.append("IFNONNULL=if (cstack$stackindexm1.l != NULL) goto $label;\n");
            sb.append("TABLESWITCH_START=switch (cstack$stackindexm1.i) {\n");
            sb.append("TABLESWITCH_PART=    case $index: goto $label; break;\n");
            sb.append("TABLESWITCH_DEFAULT=    default: goto $label; break;\n");
            sb.append("TABLESWITCH_END=}\n");
            sb.append("LOOKUPSWITCH_START=switch (cstack$stackindexm1.i) {\n");
            sb.append("LOOKUPSWITCH_PART=    case $key: goto $label; break;\n");
            sb.append("LOOKUPSWITCH_DEFAULT=    default: goto $label; break;\n");
            sb.append("LOOKUPSWITCH_END=}\n");
            //sb.append("#TRYCATCH_START=if ((*env)->ExceptionCheck(env)) { jthrowable exception = env->ExceptionOccurred(); env->ExceptionClear(); cstack0.l = exception; refs.insert(exception);\n");
            sb.append("TRYCATCH_START=if ((*env)->ExceptionCheck(env)) { \n");
            //sb.append("#TRYCATCH_CHECK_STACK=if (env->IsInstanceOf(cstack0.l, $exception_class_ptr)) { goto $handler_block; }\n");
            sb.append("TRYCATCH_CHECK_STACK=if ((*env)->IsInstanceOf(env, cstack0.l, $class_ptr(env)->clazz)) { \\n(*env)->ExceptionClear(env);\\n goto $handler_block; \\n}\n");
            sb.append("TRYCATCH_ANY_L=goto $handler_block;\n");
            sb.append("TRYCATCH_END_STACK=(*env)->Throw(env, (jthrowable) cstack0.l); return temp0.$rettype;\n");
            sb.append("TRYCATCH_END_STACK_VOID=(*env)->Throw(env, (jthrowable) cstack0.l);return;\n");
            sb.append("TRYCATCH_EMPTY=if ((*env)->ExceptionCheck(env)) { return temp0.$rettype; }\n");
            sb.append("TRYCATCH_VOID=if ((*env)->ExceptionCheck(env)) { return; }\n");
            //sb.append("#GETSTATIC_1=cstack$stackindex0.i = (jint) env->GetStaticBooleanField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_1=cstack$stackindex0.i = (*env)->GetStaticBooleanField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_2=cstack$stackindex0.i = (jint) env->GetStaticCharField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_2=cstack$stackindex0.i = (*env)->GetStaticCharField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_3=cstack$stackindex0.i = (jint) env->GetStaticByteField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_3=cstack$stackindex0.i = (*env)->GetStaticByteField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_4=cstack$stackindex0.i = (jint) env->GetStaticShortField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_4=cstack$stackindex0.i = (*env)->GetStaticShortField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_5=cstack$stackindex0.i = env->GetStaticIntField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_5=cstack$stackindex0.i = (*env)->GetStaticIntField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_6=cstack$stackindex0.f = env->GetStaticFloatField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_6=cstack$stackindex0.f = (*env)->GetStaticFloatField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_7=cstack$stackindex0.j = env->GetStaticLongField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_7=cstack$stackindex0.j = (*env)->GetStaticLongField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_8=cstack$stackindex0.d = env->GetStaticDoubleField($class_ptr, $fieldid); $trycatchhandler\n");
            sb.append("GETSTATIC_8=cstack$stackindex0.d = (*env)->GetStaticDoubleField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_9=cstack$stackindex0.l = env->GetStaticObjectField($class_ptr, $fieldid); refs.insert(cstack$stackindex0.l); $trycatchhandler\n");
            sb.append("GETSTATIC_9=cstack$stackindex0.l = (*env)->GetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_10=cstack$stackindex0.l = env->GetStaticObjectField($class_ptr, $fieldid); refs.insert(cstack$stackindex0.l); $trycatchhandler\n");
            sb.append("GETSTATIC_10=cstack$stackindex0.l = (*env)->GetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETSTATIC_11=cstack$stackindex0.l = env->GetStaticObjectField($class_ptr, $fieldid); refs.insert(cstack$stackindex0.l); $trycatchhandler\n");
            sb.append("GETSTATIC_11=cstack$stackindex0.l = (*env)->GetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id); $trycatchhandler\n");
            //sb.append("#GETFIELD_1=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = (jint) env->GetBooleanField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_1=cstack$stackindexm1.i = (*env)->GetBooleanField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_1_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_1_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_1_S_CONST_ERROR_DESC=GETFIELD Boolean npe\n");
            //sb.append("#GETFIELD_2=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = (jint) env->GetCharField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_2=cstack$stackindexm1.i = (*env)->GetCharField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_2_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_2_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_2_S_CONST_ERROR_DESC=GETFIELD Char npe\n");
            //sb.append("#GETFIELD_3=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = (jint) env->GetByteField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_3=cstack$stackindexm1.i = (*env)->GetByteField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_3_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_3_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_3_S_CONST_ERROR_DESC=GETFIELD Byte npe\n");
            //sb.append("#GETFIELD_4=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = (jint) env->GetShortField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_4=cstack$stackindexm1.i = (*env)->GetShortField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_4_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_4_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_4_S_CONST_ERROR_DESC=GETFIELD Short npe\n");
            //sb.append("#GETFIELD_5=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.i = env->GetIntField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_5=cstack$stackindexm1.i = (*env)->GetIntField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_5_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_5_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_5_S_CONST_ERROR_DESC=GETFIELD Int npe\n");
            //sb.append("#GETFIELD_6=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.f = env->GetFloatField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_6=cstack$stackindexm1.f = (*env)->GetFloatField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_6_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_6_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_6_S_CONST_ERROR_DESC=GETFIELD Float npe\n");
            //sb.append("#GETFIELD_7=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.j = env->GetLongField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_7=cstack$stackindexm1.j = (*env)->GetLongField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_7_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_7_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_7_S_CONST_ERROR_DESC=GETFIELD Long npe\n");
            //sb.append("#GETFIELD_8=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$stackindexm1.d = env->GetDoubleField(cstack$stackindexm1.l, $fieldid); $trycatchhandler\n");
            sb.append("GETFIELD_8=cstack$stackindexm1.d = (*env)->GetDoubleField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_8_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_8_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_8_S_CONST_ERROR_DESC=GETFIELD Double npe\n");
            //sb.append("#GETFIELD_9=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->GetObjectField(cstack$stackindexm1.l, $fieldid); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("GETFIELD_9=cstack$stackindexm1.l = (*env)->GetObjectField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_9_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_9_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_9_S_CONST_ERROR_DESC=GETFIELD Object npe\n");
            //sb.append("#GETFIELD_10=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->GetObjectField(cstack$stackindexm1.l, $fieldid); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("GETFIELD_10=cstack$stackindexm1.l = (*env)->GetObjectField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_10_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_10_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_10_S_CONST_ERROR_DESC=GETFIELD Object npe\n");
            //sb.append("#GETFIELD_11=if (cstack$stackindexm1.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->GetObjectField(cstack$stackindexm1.l, $fieldid); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("GETFIELD_11=cstack$stackindexm1.l = (*env)->GetObjectField(env, cstack$stackindexm1.l, $class_ptr(env)->$field_id); $trycatchhandler\n");
            sb.append("GETFIELD_11_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("GETFIELD_11_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("GETFIELD_11_S_CONST_ERROR_DESC=GETFIELD Object npe\n");
            //sb.append("#PUTSTATIC_1=env->SetStaticBooleanField($class_ptr, $fieldid, (jboolean) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTSTATIC_1=(*env)->SetStaticBooleanField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.i); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_2=env->SetStaticCharField($class_ptr, $fieldid, (jchar) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTSTATIC_2=(*env)->SetStaticCharField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.i); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_3=env->SetStaticByteField($class_ptr, $fieldid, (jbyte) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTSTATIC_3=(*env)->SetStaticByteField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.i); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_4=env->SetStaticShortField($class_ptr, $fieldid, (jshort) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTSTATIC_4=(*env)->SetStaticShortField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.i); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_5=env->SetStaticIntField($class_ptr, $fieldid, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTSTATIC_5=(*env)->SetStaticIntField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.i); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_6=env->SetStaticFloatField($class_ptr, $fieldid, cstack$stackindexm1.f); $trycatchhandler\n");
            sb.append("PUTSTATIC_6=(*env)->SetStaticFloatField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.f); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_7=env->SetStaticLongField($class_ptr, $fieldid, cstack$stackindexm2.j); $trycatchhandler\n");
            sb.append("PUTSTATIC_7=(*env)->SetStaticLongField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm2.j); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_8=env->SetStaticDoubleField($class_ptr, $fieldid, cstack$stackindexm2.d); $trycatchhandler\n");
            sb.append("PUTSTATIC_8=(*env)->SetStaticDoubleField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm2.d); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_9=env->SetStaticObjectField($class_ptr, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTSTATIC_9=(*env)->SetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.l); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_10=env->SetStaticObjectField($class_ptr, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTSTATIC_10=(*env)->SetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.l); $trycatchhandler\n");
            //sb.append("#PUTSTATIC_11=env->SetStaticObjectField($class_ptr, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTSTATIC_11=(*env)->SetStaticObjectField(env, $class_ptr(env)->clazz, $class_ptr(env)->$field_id, cstack$stackindexm1.l); $trycatchhandler\n");
            //sb.append("#PUTFIELD_1=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetBooleanField(cstack$stackindexm2.l, $fieldid, (jboolean) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTFIELD_1=(*env)->SetBooleanField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.i);$trycatchhandler\n");
            sb.append("PUTFIELD_1_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_1_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_1_S_CONST_ERROR_DESC=PUTFIELD Boolean npe\n");
            //sb.append("#PUTFIELD_2=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetCharField(cstack$stackindexm2.l, $fieldid, (jchar) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTFIELD_2=(*env)->SetCharField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.i);$trycatchhandler\n");
            sb.append("PUTFIELD_2_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_2_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_2_S_CONST_ERROR_DESC=PUTFIELD Char npe\n");
            //sb.append("#PUTFIELD_3=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetByteField(cstack$stackindexm2.l, $fieldid, (jbyte) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTFIELD_3=(*env)->SetByteField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.i);$trycatchhandler\n");
            sb.append("PUTFIELD_3_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_3_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_3_S_CONST_ERROR_DESC=PUTFIELD Byte npe\n");
            //sb.append("#PUTFIELD_4=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetShortField(cstack$stackindexm2.l, $fieldid, (jshort) cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTFIELD_4=(*env)->SetShortField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.i);$trycatchhandler\n");
            sb.append("PUTFIELD_4_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_4_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_4_S_CONST_ERROR_DESC=PUTFIELD Short npe\n");
            //sb.append("#PUTFIELD_5=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetIntField(cstack$stackindexm2.l, $fieldid, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("PUTFIELD_5=(*env)->SetIntField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.i);$trycatchhandler\n");
            sb.append("PUTFIELD_5_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_5_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_5_S_CONST_ERROR_DESC=PUTFIELD Int npe\n");
            //sb.append("#PUTFIELD_6=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetFloatField(cstack$stackindexm2.l, $fieldid, cstack$stackindexm1.f); $trycatchhandler\n");
            sb.append("PUTFIELD_6=(*env)->SetFloatField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.f);$trycatchhandler\n");
            sb.append("PUTFIELD_6_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_6_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_6_S_CONST_ERROR_DESC=PUTFIELD Float npe\n");
            //sb.append("#PUTFIELD_7=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetLongField(cstack$stackindexm3.l, $fieldid, cstack$stackindexm2.j); $trycatchhandler\n");
            sb.append("PUTFIELD_7=(*env)->SetLongField(env, cstack$stackindexm3.l, $class_ptr(env)->$field_id, cstack$stackindexm2.j);$trycatchhandler\n");
            sb.append("PUTFIELD_7_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_7_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_7_S_CONST_ERROR_DESC=PUTFIELD Long npe\n");
            //sb.append("#PUTFIELD_8=if (cstack$stackindexm3.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetDoubleField(cstack$stackindexm3.l, $fieldid, cstack$stackindexm2.d); $trycatchhandler\n");
            sb.append("PUTFIELD_8=(*env)->SetDoubleField(env, cstack$stackindexm3.l, $class_ptr(env)->$field_id, cstack$stackindexm2.d);$trycatchhandler\n");
            sb.append("PUTFIELD_8_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_8_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_8_S_CONST_ERROR_DESC=PUTFIELD Double npe\n");
            //sb.append("#PUTFIELD_9=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetObjectField(cstack$stackindexm2.l, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTFIELD_9=(*env)->SetObjectField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.l);$trycatchhandler\n");
            sb.append("PUTFIELD_9_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_9_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_9_S_CONST_ERROR_DESC=PUTFIELD Object npe\n");
            //sb.append("#PUTFIELD_10=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetObjectField(cstack$stackindexm2.l, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTFIELD_10=(*env)->SetObjectField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.l);$trycatchhandler\n");
            sb.append("PUTFIELD_10_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_10_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_10_S_CONST_ERROR_DESC=PUTFIELD Object npe\n");
            //sb.append("#PUTFIELD_11=if (cstack$stackindexm2.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->SetObjectField(cstack$stackindexm2.l, $fieldid, cstack$stackindexm1.l); $trycatchhandler\n");
            sb.append("PUTFIELD_11=(*env)->SetObjectField(env, cstack$stackindexm2.l, $class_ptr(env)->$field_id, cstack$stackindexm1.l);$trycatchhandler\n");
            sb.append("PUTFIELD_11_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("PUTFIELD_11_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("PUTFIELD_11_S_CONST_ERROR_DESC=PUTFIELD Object npe\n");
            //sb.append("#NEWARRAY_4=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewBooleanArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_4= cstack$stackindexm1.l = (*env)->NewBooleanArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_4_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_4_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_4_S_CONST_ERROR_DESC=NEWARRAY Boolean array size < 0\n");
            //sb.append("#NEWARRAY_5=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewCharArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_5=cstack$stackindexm1.l = (*env)->NewCharArray(env, cstack$stackindexm1.i);  $trycatchhandler\n");
            sb.append("NEWARRAY_5_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_5_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_5_S_CONST_ERROR_DESC=NEWARRAY Char array size < 0\n");
            //sb.append("#NEWARRAY_6=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewFloatArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_6= cstack$stackindexm1.l = (*env)->NewFloatArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_6_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_6_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_6_S_CONST_ERROR_DESC=NEWARRAY Float array size < 0\n");
            //sb.append("#NEWARRAY_7=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewDoubleArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_7= cstack$stackindexm1.l = (*env)->NewDoubleArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_7_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_7_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_7_S_CONST_ERROR_DESC=NEWARRAY Double array size < 0\n");
            //sb.append("#NEWARRAY_8=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewByteArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_8= cstack$stackindexm1.l = (*env)->NewByteArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_8_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_8_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_8_S_CONST_ERROR_DESC=NEWARRAY Byte array size < 0\n");
            //sb.append("#NEWARRAY_9=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewShortArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_9=cstack$stackindexm1.l = (*env)->NewShortArray(env, cstack$stackindexm1.i);  $trycatchhandler\n");
            sb.append("NEWARRAY_9_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_9_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_9_S_CONST_ERROR_DESC=NEWARRAY Short array size < 0\n");
            //sb.append("#NEWARRAY_10=if (cstack$stackindexm1.i < 0) throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewIntArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_10=cstack$stackindexm1.l = (*env)->NewIntArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_10_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_10_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_10_S_CONST_ERROR_DESC=NEWARRAY Int array size < 0\n");
            //sb.append("#NEWARRAY_11=if (cstack$stackindexm1.i < 0) utils::throw_exception(env, \"#NASE\", \"#ERROR_DESC\", $line); \\nelse { cstack$stackindexm1.l = env->NewLongArray(cstack$stackindexm1.i); refs.insert(cstack$stackindexm1.l); } $trycatchhandler\n");
            sb.append("NEWARRAY_11= cstack$stackindexm1.l = (*env)->NewLongArray(env, cstack$stackindexm1.i); $trycatchhandler\n");
            sb.append("NEWARRAY_11_S_VARS=#NASE,#ERROR_DESC\n");
            sb.append("NEWARRAY_11_S_CONST_NASE=java/lang/NegativeArraySizeException\n");
            sb.append("NEWARRAY_11_S_CONST_ERROR_DESC=NEWARRAY Long array size < 0\n");
            sb.append("INVOKE_ARG_1=cstack$index.i\n");
            sb.append("INVOKE_ARG_2=cstack$index.i\n");
            sb.append("INVOKE_ARG_3=cstack$index.i\n");
            sb.append("INVOKE_ARG_4=cstack$index.i\n");
            sb.append("INVOKE_ARG_5=cstack$index.i\n");
            sb.append("INVOKE_ARG_6=cstack$index.f\n");
            sb.append("INVOKE_ARG_7=cstack$index.j\n");
            sb.append("INVOKE_ARG_8=cstack$index.d\n");
            sb.append("INVOKE_ARG_9=cstack$index.l\n");
            sb.append("INVOKE_ARG_10=cstack$index.l\n");
            sb.append("INVOKE_ARG_11=cstack$index.l\n");
            //sb.append("#INVOKESPECIAL_0=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->CallNonvirtualVoidMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_0=(*env)->CallNonvirtualVoidMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_0_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_0_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_0_S_CONST_ERROR_DESC=INVOKESPECIAL Void npe\n");
            //sb.append("#INVOKESPECIAL_1=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallNonvirtualBooleanMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_1=cstack$returnstackindex.i = (*env)->CallNonvirtualBooleanMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_1_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_1_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_1_S_CONST_ERROR_DESC=INVOKESPECIAL Boolean npe\n");
            //sb.append("#INVOKESPECIAL_2=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallNonvirtualCharMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_2=cstack$returnstackindex.i = (*env)->CallNonvirtualCharMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_2_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_2_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_2_S_CONST_ERROR_DESC=INVOKESPECIAL Char npe\n");
            //sb.append("#INVOKESPECIAL_3=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallNonvirtualByteMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_3=cstack$returnstackindex.i = (*env)->CallNonvirtualByteMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_3_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_3_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_3_S_CONST_ERROR_DESC=INVOKESPECIAL Bye npe\n");
            //sb.append("#INVOKESPECIAL_4=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallNonvirtualShortMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_4=cstack$returnstackindex.i = (*env)->CallNonvirtualShortMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_4_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_4_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_4_S_CONST_ERROR_DESC=INVOKESPECIAL Short npe\n");
            //sb.append("#INVOKESPECIAL_5=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = env->CallNonvirtualIntMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_5=cstack$returnstackindex.i = (*env)->CallNonvirtualIntMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_5_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_5_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_5_S_CONST_ERROR_DESC=INVOKESPECIAL Int npe\n");
            //sb.append("#INVOKESPECIAL_6=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.f = env->CallNonvirtualFloatMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_6=cstack$returnstackindex.f = (*env)->CallNonvirtualFloatMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_6_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_6_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_6_S_CONST_ERROR_DESC=INVOKESPECIAL Float npe\n");
            //sb.append("#INVOKESPECIAL_7=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.j = env->CallNonvirtualLongMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_7=cstack$returnstackindex.j = (*env)->CallNonvirtualLongMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_7_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_7_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_7_S_CONST_ERROR_DESC=INVOKESPECIAL Long npe\n");
            //sb.append("#INVOKESPECIAL_8=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.d = env->CallNonvirtualDoubleMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESPECIAL_8=cstack$returnstackindex.d = (*env)->CallNonvirtualDoubleMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_8_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_8_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_8_S_CONST_ERROR_DESC=INVOKESPECIAL Double npe\n");
            //sb.append("#INVOKESPECIAL_9=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallNonvirtualObjectMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKESPECIAL_9=cstack$returnstackindex.l = (*env)->CallNonvirtualObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_9_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_9_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_9_S_CONST_ERROR_DESC=INVOKESPECIAL Object npe\n");
            //sb.append("#INVOKESPECIAL_10=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallNonvirtualObjectMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKESPECIAL_10=cstack$returnstackindex.l = (*env)->CallNonvirtualObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_10_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_10_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_10_S_CONST_ERROR_DESC=INVOKESPECIAL Object npe\n");
            //sb.append("#INVOKESPECIAL_11=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallNonvirtualObjectMethod(cstack$objectstackindex.l, $class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKESPECIAL_11=cstack$returnstackindex.l = (*env)->CallNonvirtualObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKESPECIAL_11_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKESPECIAL_11_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKESPECIAL_11_S_CONST_ERROR_DESC=INVOKESPECIAL Object npe\n");
            //sb.append("#INVOKEINTERFACE_0=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->CallVoidMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_0=(*env)->CallVoidMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("CallIntMethod(env, stack0.l, c_18_(env)->id_3, stack1.i);\n");
            sb.append("INVOKEINTERFACE_0_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_0_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_0_S_CONST_ERROR_DESC=INVOKEINTERFACE Void npe\n");
            //sb.append("#INVOKEINTERFACE_1=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallBooleanMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_1=cstack$returnstackindex.i = (*env)->CallBooleanMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_1_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_1_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_1_S_CONST_ERROR_DESC=INVOKEINTERFACE Boolean npe\n");
            //sb.append("#INVOKEINTERFACE_2=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallCharMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_2=if (cstack$objectstackindex.l == NULL) throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (*env)->CallCharMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_2_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_2_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_2_S_CONST_ERROR_DESC=INVOKEINTERFACE Char npe\n");
            //sb.append("#INVOKEINTERFACE_3=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallByteMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_3=cstack$returnstackindex.i = (*env)->CallByteMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_3_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_3_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_3_S_CONST_ERROR_DESC=INVOKEINTERFACE Bye npe\n");
            //sb.append("#INVOKEINTERFACE_4=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallShortMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_4=cstack$returnstackindex.i = (*env)->CallShortMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_4_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_4_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_4_S_CONST_ERROR_DESC=INVOKEINTERFACE Short npe\n");
            //sb.append("#INVOKEINTERFACE_5=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = env->CallIntMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_5=cstack$returnstackindex.i = (*env)->CallIntMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_5_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_5_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_5_S_CONST_ERROR_DESC=INVOKEINTERFACE Int npe\n");
            //sb.append("#INVOKEINTERFACE_6=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.f = env->CallFloatMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_6=cstack$returnstackindex.f = (*env)->CallFloatMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_6_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_6_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_6_S_CONST_ERROR_DESC=INVOKEINTERFACE Float npe\n");
            //sb.append("#INVOKEINTERFACE_7=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.j = env->CallLongMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_7=cstack$returnstackindex.j = (*env)->CallLongMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_7_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_7_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_7_S_CONST_ERROR_DESC=INVOKEINTERFACE Long npe\n");
            //sb.append("#INVOKEINTERFACE_8=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.d = env->CallDoubleMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_8=cstack$returnstackindex.d = (*env)->CallDoubleMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_8_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_8_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_8_S_CONST_ERROR_DESC=INVOKEINTERFACE Double npe\n");
            //sb.append("#INVOKEINTERFACE_9=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallObjectMethod(cstack$objectstackindex.l, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_9=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_9_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_9_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_9_S_CONST_ERROR_DESC=INVOKEINTERFACE Object npe\n");
            //sb.append("#INVOKEINTERFACE_10=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallObjectMethod(cstack$objectstackindex.l, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_10=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_10_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_10_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_10_S_CONST_ERROR_DESC=INVOKEINTERFACE Object npe\n");
            //sb.append("#INVOKEINTERFACE_11=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallObjectMethod(cstack$objectstackindex.l, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKEINTERFACE_11=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEINTERFACE_11_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEINTERFACE_11_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEINTERFACE_11_S_CONST_ERROR_DESC=INVOKEINTERFACE Object npe\n");
            //sb.append("#INVOKEVIRTUAL_0=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse env->CallVoidMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_0=(*env)->CallVoidMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_0_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_0_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_0_S_CONST_ERROR_DESC=INVOKEVIRTUAL Void npe\n");
            //sb.append("#INVOKEVIRTUAL_1=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallBooleanMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_1=cstack$returnstackindex.i = (*env)->CallBooleanMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_1_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_1_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_1_S_CONST_ERROR_DESC=INVOKEVIRTUAL Boolean npe\n");
            //sb.append("#INVOKEVIRTUAL_2=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallCharMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_2=cstack$returnstackindex.i = (*env)->CallCharMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_2_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_2_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_2_S_CONST_ERROR_DESC=INVOKEVIRTUAL Char npe\n");
            //sb.append("#INVOKEVIRTUAL_3=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallByteMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_3=cstack$returnstackindex.i = (*env)->CallByteMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_3_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_3_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_3_S_CONST_ERROR_DESC=INVOKEVIRTUAL Bye npe\n");
            //sb.append("#INVOKEVIRTUAL_4=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = (jint) env->CallShortMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_4=cstack$returnstackindex.i = (*env)->CallShortMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_4_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_4_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_4_S_CONST_ERROR_DESC=INVOKEVIRTUAL Short npe\n");
            //sb.append("#INVOKEVIRTUAL_5=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.i = env->CallIntMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_5=cstack$returnstackindex.i = (*env)->CallIntMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_5_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_5_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_5_S_CONST_ERROR_DESC=INVOKEVIRTUAL Int npe\n");
            //sb.append("#INVOKEVIRTUAL_6=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.f = env->CallFloatMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_6=cstack$returnstackindex.f = (*env)->CallFloatMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_6_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_6_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_6_S_CONST_ERROR_DESC=INVOKEVIRTUAL Float npe\n");
            //sb.append("#INVOKEVIRTUAL_7=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.j = env->CallLongMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_7=cstack$returnstackindex.j = (*env)->CallLongMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_7_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_7_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_7_S_CONST_ERROR_DESC=INVOKEVIRTUAL Long npe\n");
            //sb.append("#INVOKEVIRTUAL_8=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse cstack$returnstackindex.d = env->CallDoubleMethod(cstack$objectstackindex.l, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_8=cstack$returnstackindex.d = (*env)->CallDoubleMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_8_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_8_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_8_S_CONST_ERROR_DESC=INVOKEVIRTUAL Double npe\n");
            //sb.append("#INVOKEVIRTUAL_9=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallObjectMethod(cstack$objectstackindex.l, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_9=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_9_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_9_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_9_S_CONST_ERROR_DESC=INVOKEVIRTUAL Object npe\n");
            sb.append("INVOKEVIRTUAL_10=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_10_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_10_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_10_S_CONST_ERROR_DESC=INVOKEVIRTUAL Object npe\n");
            //sb.append("#INVOKEVIRTUAL_11=if (cstack$objectstackindex.l == nullptr) utils::throw_exception(env, \"#NPE\", \"#ERROR_DESC\", $line); \\nelse { cstack$returnstackindex.l = env->CallObjectMethod(cstack$objectstackindex.l, $methodid$args); refs.insert(cstack$returnstackindex.l); } $trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_11=cstack$returnstackindex.l = (*env)->CallObjectMethod(env, cstack$objectstackindex.l, $class_ptr(env)->$methodid$args);$trycatchhandler\n");
            sb.append("INVOKEVIRTUAL_11_S_VARS=#NPE,#ERROR_DESC\n");
            sb.append("INVOKEVIRTUAL_11_S_CONST_NPE=java/lang/NullPointerException\n");
            sb.append("INVOKEVIRTUAL_11_S_CONST_ERROR_DESC=INVOKEVIRTUAL Object npe\n");
            //sb.append("#INVOKESTATIC_0=env->CallStaticVoidMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_0=(*env)->CallStaticVoidMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_1=cstack$returnstackindex.i = (jint) env->CallStaticBooleanMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_1=cstack$returnstackindex.i = (*env)->CallStaticBooleanMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_2=cstack$returnstackindex.i = (jint) env->CallStaticCharMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_2=cstack$returnstackindex.i = (*env)->CallStaticCharMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_3=cstack$returnstackindex.i = (jint) env->CallStaticByteMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_3=cstack$returnstackindex.i = (*env)->CallStaticByteMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_4=cstack$returnstackindex.i = (jint) env->CallStaticShortMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_4=cstack$returnstackindex.i = (*env)->CallStaticShortMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_5=cstack$returnstackindex.i = env->CallStaticIntMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_5=cstack$returnstackindex.i = (*env)->CallStaticIntMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_6=cstack$returnstackindex.f = env->CallStaticFloatMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_6=cstack$returnstackindex.f = (*env)->CallStaticFloatMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_7=cstack$returnstackindex.j = env->CallStaticLongMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_7=cstack$returnstackindex.j = (*env)->CallStaticLongMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_8=cstack$returnstackindex.d = env->CallStaticDoubleMethod($class_ptr, $methodid$args); $trycatchhandler\n");
            sb.append("INVOKESTATIC_8=cstack$returnstackindex.d = (*env)->CallStaticDoubleMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_9=cstack$returnstackindex.l = env->CallStaticObjectMethod($class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); $trycatchhandler\n");
            sb.append("INVOKESTATIC_9=cstack$returnstackindex.l = (*env)->CallStaticObjectMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_10=cstack$returnstackindex.l = env->CallStaticObjectMethod($class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); $trycatchhandler\n");
            sb.append("INVOKESTATIC_10=cstack$returnstackindex.l = (*env)->CallStaticObjectMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#INVOKESTATIC_11=cstack$returnstackindex.l = env->CallStaticObjectMethod($class_ptr, $methodid$args); refs.insert(cstack$returnstackindex.l); $trycatchhandler\n");
            sb.append("INVOKESTATIC_11=cstack$returnstackindex.l = (*env)->CallStaticObjectMethod(env, $class_ptr(env)->clazz, $class_ptr(env)->$methodid$args); $trycatchhandler\n");
            //sb.append("#CHECKCAST=if (cstack$stackindexm1.l != nullptr && !env->IsInstanceOf(cstack$stackindexm1.l, $desc_ptr)) { utils::throw_exception(env, #CCE, (std::string(#ERROR_DESC) + std::string($desc)).c_str(), $line); $trycatchhandler }\n");
            sb.append("CHECKCAST=if (cstack$stackindexm1.l != NULL && !(*env)->IsInstanceOf(env, cstack$stackindexm1.l, $class_ptr(env)->clazz)){throw_exception(env, \"#CCE\", \"#ERROR_DESC\", $line); (*env)->ThrowNew(env, $exception_ptr(env)->clazz, \"\");}$trycatchhandler\n");
            sb.append("CHECKCAST_S_VARS=#CCE,#ERROR_DESC,$desc\n");
            sb.append("CHECKCAST_S_CONST_CCE=java/lang/ClassCastException\n");
            sb.append("CHECKCAST_S_CONST_ERROR_DESC=cannot cast to \n");
            snippets.load(new ByteArrayInputStream(sb.toString().getBytes(StandardCharsets.UTF_8)));
        } catch (IOException e) {
            throw new RuntimeException("Can't load cpp snippets", e);
        }
    }

    private String[] getVars(String key) {
        key += "_S_VARS";
        String result = snippets.getProperty(key);
        if (result == null || result.isEmpty()) {
            return new String[0];
        }
        return result.split(",");
    }

    public String getSnippet(String key) {
        return getSnippet(key, Util.createMap());
    }

    public String getSnippet(String key, Map<String, String> tokens) {
        String value = snippets.getProperty(key);
        if (value == null) {
            return "";
        }
        String[] stringVars = getVars(key);
        Map<String, String> result = new HashMap<>();
        for (String var : stringVars) {
            if (var.startsWith("#")) {
                result.put(var, snippets.getProperty(key + "_S_CONST_" + var.substring(1)));
            } else if (var.startsWith("$")) {
                result.put(var, tokens.get(var.substring(1)));
            } else {
                throw new RuntimeException("Unknown format modifier: " + var);
            }
        }

        result.entrySet().stream().filter(var -> var.getValue() == null).findAny().ifPresent(entry -> {
            throw new RuntimeException(key + " - token value can't be null");
        });

        //result.entrySet().forEach(entry -> entry.setValue(stringPool.get(entry.getValue())));
        tokens.forEach((k, v) -> {
            result.putIfAbsent("$" + k, v);
            //System.out.println(k+"====="+v);
        });

        return Util.dynamicRawFormat(value, result);
    }
}
